#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main ()
{
	int n=0, i;
	for (i = 1; i < 100; i++) {
		int a = i % 10;
		int b = i / 10;
		if (a == 9)n++;
		if (b == 9)n++;

	}
	printf("%d", n);
	return 0;
}